//
//  SWSearchTableViewTagCell.m
//  sc-cyan-ios
//
//  Created by lvjian01 on 2017/12/18.
//  Copyright © 2017年 greenbuilding. All rights reserved.
//

#import "SWSearchTableViewTagCell.h"
#import "YJTagView.h"

@interface SWSearchTableViewTagCell ()<YJTagViewDataSource,YJTagViewDelegate>

@property (weak, nonatomic) IBOutlet YJTagView *tagListView;


@end

@implementation SWSearchTableViewTagCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    
    //  设置tagView样式
    self.tagListView.themeColor = [UIColor gb_textColor_4D4D4D];
//    self.tagListView.borderColor = [UIColor redColor];
//    self.tagListView.backgroundColor = [UIColor redColor];
    self.tagListView.tagCornerRadius = 1;
    self.tagListView.cellHeight = 30;
    self.tagListView.cellBackgroundColor = [UIColor gb_background_eeeeee];
    self.tagListView.delegate = self;
    self.tagListView.dataSource = self;
    
    
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (NSInteger)numOfItems {
    return self.titleArray.count;
}

- (NSString *)tagView:(YJTagView *)tagView titleForItemAtIndex:(NSInteger)index {
    return self.titleArray[index];
}

- (void)tagView:(YJTagView *)tagView didSelectedItemAtIndex:(NSInteger)index {
    NSLog(@"点击%@", self.titleArray[index]);
    self.selectedItemWithTitle(self.titleArray[index]);
}

//- (void)tagView:(YJTagView *)tagView heightUpdated:(CGFloat)height{
//    
//    self.heightUpdated(height);
//    
//}


@end
